<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/inc/taglib.inc" %>
<%@ include file="/WEB-INF/inc/script.inc" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<base href="${base}">
    <title>中金通 | 产品详情</title>

    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="font-awesome/css/font-awesome.css" rel="stylesheet">

	<!-- Data Tables -->
    <link href="css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
    <link href="css/plugins/dataTables/dataTables.responsive.css" rel="stylesheet">
    <link href="css/plugins/dataTables/dataTables.tableTools.min.css" rel="stylesheet">

    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">

    <link href="css/plugins/datapicker/datepicker3.css" rel="stylesheet">

	<style type="text/css">
   	 textarea{
     	resize:none;
    	}
    </style>
</head>

<body>

    <div id="wrapper">

    	<!-- 左侧菜单 -->
        <jsp:include page="/WEB-INF/jsp/common/main-menu.jsp"></jsp:include>

        <div id="page-wrapper" class="gray-bg">
        <div class="row border-bottom">
        <!-- 头部工具栏区 -->
        <jsp:include page="/WEB-INF/jsp/common/main-header.jsp"></jsp:include>
        </div>
            <div class="row wrapper border-bottom white-bg page-heading">
                <div class="col-lg-10">
                    <h2>产品管理</h2>
                    <ol class="breadcrumb">
                        <li>
                            <a href="common/platform">Home</a>
                        </li>
                        <li>
                            <a href="product/list">产品管理</a>
                        </li>
                        <li>
                         <a href="product/list">产品列表</a>
                        </li>
                        <li>
                            <a href="product/detail/${product.id}">${product.briefName}</a>
                        </li>
                        <li class="active">
                            <strong>产品详情</strong>
                        </li>
                    </ol>
                </div>
                <div class="col-lg-2">

                </div>
            </div>
		
		<div class="row" style="margin-top:10px;">
			<div class="col-md-12">
                    <div class="tabs-container">
                        <ul class="nav nav-tabs">
                            <li>
								<a href="product/list">
									 产品列表
								</a>
							</li>
							<li>
								<a href="product/add">
								 	新增产品
								</a>
							</li>
							<li class="active">
								<a>
									 产品详情
								</a>
							</li>
                        </ul>
                        <div class="tab-content">
                            <div class="tab-pane active">
                                <div class="panel-body">
                               <div class="wrapper wrapper-content animated fadeInRight ecommerce">
						                        <div><!-- class="ibox-content" -->
						                            <form method="post" id="addForm" enctype="multipart/form-data"  class="form-horizontal"><!-- action="employee/doAdd" -->
									                 
									                 <%-- <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label"><button class="btn btn-w-m btn-primary" type="button" onclick='javascript:window.location.href = "product/edit/${product.id}"'>编辑</button>          </label>
						                                        <div class="col-sm-8">
						                                    	   
						                                        </div>
									                        </div>
									                    </div> 
									                    
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                        	<label class="col-sm-2 control-label"></label>
						                                        <div class="col-sm-8">
						                                    	   
						                                        </div>
									                        </div>
									                    </div>
									                 </div> --%>
									                 
									                 
									                 
						                             <%--  <div class="form-group">
						                                    <div class="col-sm-4 col-sm-offset-5">
						                                        <button class="btn btn-w-m btn-primary" type="button" onclick='javascript:window.location.href = "product/edit/${product.id}"'>编辑</button>
						                                        <!-- <button class="btn btn-white" type="reset">取 消</button> -->
						                                    </div>
						                                </div> --%>
						                              <input type="text" id="productId" name="id" style="display:none" value="${product.id}">
						                              
						                              <!--Detail form start-->
						                              <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">产品代码</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="productCode" class="form-control"  value="${product.productCode}">
						                                        </div>
									                        </div>
									                    </div>
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                        	<label class="col-sm-2 control-label" style="position:relative;margin-left:-18px;width:19%;">产品全称</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="productName" class="form-control"  value="${product.productName}">
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
						                            <!-- <div class="hr-line-dashed"></div> -->
						                             <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">产品简称</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="briefName" class="form-control"  value="${product.briefName}">
						                                        </div>
									                        </div>
									                    </div>
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-2 control-label">基金管理人</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="fundManager" class="form-control"  value="${product.fundManager}">
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
						                            <!--  <div class="hr-line-dashed"></div> -->
						                              <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">基金托管人</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="fundTrustee" class="form-control"  value="${product.fundTrustee}">
						                                        </div>
									                        </div>
									                    </div>
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                        	<label class="col-sm-2 control-label">产品承销</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="underWriter" class="form-control" value="${product.underWriter}">
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
						                             <!-- <div class="hr-line-dashed"></div> -->
						                             <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">收益类型</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" id="incomeType" name="incomeType" class="form-control" value="${product.incomeType}">
						                                        </div>
									                        </div>
									                    </div>
									                      <div class="col-sm-6">
									                        <div class="form-group">
									                        	<label class="col-sm-2 control-label">运作方式</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" id="operationMode" name="operationMode" class="form-control" value="${product.operationMode}">
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
						                             <!-- <div class="hr-line-dashed"></div> -->
						                              <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">开放日</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" id="openDate" type="text" name="openDate" class="form-control" value="${product.openDate==null||product.openDate==''?'--':product.openDate}">
						                                        </div>
									                        </div>
									                    </div>
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                        	<label class="col-sm-2 control-label">开放周期</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="openCycle" class="form-control" value="${product.openCycle==null||product.openCycle==''?'--':product.openCycle}">
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
						                             <!-- <div class="hr-line-dashed"></div> -->
						                              <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">投资规模</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="scale" class="form-control"  value='<fmt:formatNumber value="${product.scale}"  pattern="#,#00.00#"/>&nbsp;元'>
						                                        </div>
									                        </div>
									                    </div>
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                        	<label class="col-sm-2 control-label">投资期限</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="duration" class="form-control"  value="${product.duration}&nbsp;月">
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
						                              <!-- <div class="hr-line-dashed"></div> -->
						                              <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">招募开始时间</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" id="recruitStartTime" type="text" name="recruitStartTime" class="form-control"  value='<fmt:formatDate value="${product.recruitStartTime}" pattern="yyyy-MM-dd"/>'>
						                                        </div>
									                        </div>
									                    </div>
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                        	<label class="col-sm-2 control-label">招募截止时间</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" id="recruitEndTime" type="text" name="recruitEndTime" class="form-control" value='<fmt:formatDate value="${product.recruitEndTime}" pattern="yyyy-MM-dd"/>'>
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
						                             <!-- <div class="hr-line-dashed"></div> -->
						                             <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">投资起点</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="subStart" class="form-control"  value='<fmt:formatNumber value="${product.subStart}" pattern="#,#00.00#"/>&nbsp;元'>
						                                        </div>
									                        </div>
									                    </div>
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                        	<label class="col-sm-2 control-label">递增金额</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="increaseAmount" class="form-control" value='<fmt:formatNumber value="${product.increaseAmount}" pattern="#,#00.00#"/>&nbsp;元'>
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
						                             <!-- <div class="hr-line-dashed"></div> -->
						                              <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">开户行</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="bankDeposit" class="form-control"  value="${product.bankDeposit}">
						                                        </div>
									                        </div>
									                    </div>
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                        	<label class="col-sm-2 control-label">开户名</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="bankName" class="form-control" value="${product.bankName}">
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
						                              <!-- <div class="hr-line-dashed"></div> -->
						                              <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">企业银行账户</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="bankAccount" class="form-control"  value="${product.bankAccount}">
						                                        </div>
									                        </div>
									                    </div>
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                        	<label class="col-sm-2 control-label">预期收益</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="prospectiveEarnings" class="form-control" value="${product.prospectiveEarnings}">
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
						                             <!-- <div class="hr-line-dashed"></div> -->
						                             <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">收益分配</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="incomeDivide" class="form-control" value="${product.incomeDivide==null||product.incomeDivide==''?'--':product.incomeDivide}">
						                                        </div>
									                        </div>
									                    </div>
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                        	<label class="col-sm-2 control-label">产品评级</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="level" class="form-control"  value="${product.level}">
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
						                             <!-- <div class="hr-line-dashed"></div> -->
						                             <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">认购费/申购费</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="subFee" class="form-control" value='<fmt:formatNumber value="${product.subFee}" pattern="0.00%" />'>
						                                        </div>
									                        </div>
									                    </div>
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                        	<label class="col-sm-2 control-label">支付手续费</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="handlingFee" class="form-control"  value='<fmt:formatNumber value="${product.handlingFee}" pattern="#,#00.00#"/>&nbsp;元'>
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
						                             <!-- <div class="hr-line-dashed"></div> -->
						                             <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">赎回费</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" id="redeemFee" name="redeemFee" class="form-control" value='<fmt:formatNumber value="${product.redeemFee}" pattern="0.00%"/>'>
						                                        </div>
									                        </div>
									                    </div>
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                        	<label class="col-sm-2 control-label">管理费</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" id="manageFee" name="manageFee" class="form-control" value='<fmt:formatNumber value="${product.manageFee}" pattern="0.00%"/>'>
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
									                  <!-- <div class="hr-line-dashed"></div> -->
						                             <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">托管费</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" id="trusteeFee" name="trusteeFee" class="form-control" value='<fmt:formatNumber value="${product.trusteeFee}" pattern="0.00%/年" />'>
						                                        </div>
									                        </div>
									                    </div>
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                        	<label class="col-sm-2 control-label">公司介绍</label>
						                                        <div class="col-sm-8">
										                           <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="aboutId" class="form-control" value="${product.aboutId==null || product.aboutId=='' ?'无':product.aboutId}">
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
						                             <!-- <div class="hr-line-dashed"></div> -->
						                             <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">集资对象</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="fundRaising" class="form-control"  value="${product.fundRaising}">
						                                        </div>
									                        </div>
									                    </div>
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                        	<label class="col-sm-2 control-label">咨询电话</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="consultPhone" class="form-control" value="${product.consultPhone}">
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
									                 <!-- <div class="hr-line-dashed"></div> -->
						                             <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">成立日期</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" id="setupTime" name="setupTime" class="form-control" value='<fmt:formatDate value="${product.setupTime}" pattern="yyyy-MM-dd"/>'>
						                                        </div>
									                        </div>
									                    </div>
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                        	<label class="col-sm-2 control-label">基金经理</label>
						                                        <div class="col-sm-8">
						                                        	<input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" id="selectedFundManager" name="selectedFundManager" class="form-control" value="${product.selectedFundManager==null||product.selectedFundManager==''?'--':product.selectedFundManager}">
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
						                             <!-- <div class="hr-line-dashed"></div> -->
						                             <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">合同编号前缀</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="contactPrefix" class="form-control" value="${product.contactPrefix}">
						                                        </div>
									                        </div>
									                    </div>
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                        	<label class="col-sm-2 control-label">产品状态</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" id="state" name="state" class="form-control" value="${product.state}">
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
									                  <!-- <div class="hr-line-dashed"></div> -->
						                             <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">推送组别</label>
						                                        <div class="col-sm-8">
						                                        	<input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" id="selectedInvestorGroup" name="selectedInvestorGroup" class="form-control" value="${product.selectedInvestorGroup==null||product.selectedInvestorGroup==''?'--':product.selectedInvestorGroup}">
						                                        </div>
									                        </div>
									                    </div>
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                        	<label class="col-sm-2 control-label">产品所属组别</label>
						                                        <div class="col-sm-8">
						                                        	<input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="productGroupId" class="form-control" value="${product.productGroupId==null||product.productGroupId==''?'无':productGroupName}">
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
									                 <!-- <div class="hr-line-dashed"></div> -->
						                             <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">排序值</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="orders" class="form-control"  value="${product.orders}">
						                                        </div>
									                        </div>
									                    </div>
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                        	<label class="col-sm-2 control-label">启息日期</label>
						                                        <div class="col-sm-8">
						                                        	<input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" id="interestDate" name="interestDate" class="form-control" value='<fmt:formatDate value="${product.interestDate}" pattern="yyyy-MM-dd"/>'>
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
									                 <!-- <div class="hr-line-dashed"></div> -->
						                             <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">剩余份额</label>
						                                        <div class="col-sm-8">
						                                        	<input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="available" class="form-control"  value='<fmt:formatNumber value="${product.available}" pattern="#,#00.00#"/>&nbsp;元'>
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
						                             <!-- <div class="hr-line-dashed"></div> -->
						                             <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">产品图片</label>
						                                        <div class="col-sm-8">
						                                    	   <%-- <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="thumbnail" class="form-control"  value="${product.thumbnail}"> --%>
						                                           <a  title="Image from Unsplash" data-gallery=""><img style="width:400px;height:300px" src="${imagePrefix}${product.thumbnail}"></a> 
																        <!-- 选择文件:<input readonly style="border:0px;background:#0f0;background-color:transparent;" type="file" name="file"><button type="button" id="uploadImageBtn" class="btn btn-outline btn-primary">上传</button> -->
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
									                 <!-- <div class="hr-line-dashed"></div> -->
									                 <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">基金投向</label>
						                                        <div class="col-sm-8">
						                                    	   <textarea readonly style="border:0px;background:#0f0;background-color:transparent;" id="fundInvest" name="fundInvest" class="form-control"  rows="10">${product.fundInvest}</textarea>
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
									                 <!-- <div class="hr-line-dashed"></div> -->
						                             <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">投资范围</label>
						                                        <div class="col-sm-8">
						                                    	   <textarea readonly style="border:0px;background:#0f0;background-color:transparent;" id="investScope" name="investScope" class="form-control"  rows="10">${product.investScope}</textarea>
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
						                             <!-- <div class="hr-line-dashed"></div> -->
						                             <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">风控措施</label>
						                                        <div class="col-sm-8">
						                                    	   <textarea readonly style="border:0px;background:#0f0;background-color:transparent;" id="riskControl" name="riskControl" class="form-control"  rows="10">${product.riskControl}</textarea>
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
						                             <!-- <div class="hr-line-dashed"></div> -->
						                             <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">备注</label>
						                                        <div class="col-sm-8">
						                                    	   <textarea readonly style="border:0px;background:#0f0;background-color:transparent;" id="remark" name="remark" class="form-control"  rows="10">${(product.remark==null||product.remark=='')?'--':product.remark}</textarea>
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
									                 <!-- <div class="hr-line-dashed"></div> -->
													<div class="row">
														<div class="col-sm-6">
															<div class="form-group">
																<label class="col-sm-4 control-label">产品售卖部门</label>
																<div class="col-sm-8">
																	<input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" id="selectedEmployeeGroup" name="selectedEmployeeGroup" class="form-control" value="${product.selectedEmployeeGroup==null||product.selectedEmployeeGroup==''?'--':product.selectedEmployeeGroup}">
																</div>
															</div>
														</div>
													</div>
									                  <!-- <div class="hr-line-dashed"></div> -->
						                             <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">产品档次</label>
						                                        <div class="col-sm-8">
						                                    	   <table id="modelEditable" class="table table-striped table-bordered table-hover">
										                                <thead>
										                                <tr>
										                                    <th>档次</th>
										                                    <th>认购范围</th>
										                                    <th>预期收益</th>
										                                    <th>备注</th>
										                                    <!-- <th style="background-color:white;">操作</th> -->
										                                </tr>
										                                </thead>
										                                <tbody>
										                                </tbody>
										                            </table>
						                                       </div>
									                        </div>
									                    </div>
									                 </div>
						                             <!-- <div class="hr-line-dashed"></div> -->
						                               <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">产品合同</label>
						                                        <div class="col-sm-8">
						                                    	   <input id="contactFile" readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="contactFile" class="form-control"  value="${product.contactFile}">  
						                                           <%-- <a  href="product/downloadFile?filePath=${product.contactFile}" title="Image from Unsplash" data-gallery="">${product.contactFile}</a>  --%> 
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
									                 <!-- <div class="hr-line-dashed"></div> -->
						                               <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">风险揭示书</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="riskDisclosure" class="form-control"  value="${product.riskDisclosure}">  
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
									                 <!-- <div class="hr-line-dashed"></div> -->
						                               <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">发行方</label>
						                                        <div class="col-sm-8">
						                                    	   <input id="issuer" readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="issuer" class="form-control"  value="${product.issuer==''||product.issuer==null?'无':product.issuer}">  
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
									                 <!-- <div class="hr-line-dashed"></div> -->
						                             <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">佣金设置</label>
						                                        <div class="col-sm-8">
						                                    	     <input type="radio" disabled value="option1" id="optionsRadios1" name="optionsRadios">&nbsp;默认设置&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                     <input type="radio" disabled value="option2" id="optionsRadios2" name="optionsRadios">&nbsp;自定义设置
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
									                 <br>
									                 <!-- <div class="hr-line-dashed"></div> -->
									                 <div id="default_comm_div" >
														<div class="row">
															<div class="col-sm-6">
																<div class="form-group">
									                            <label class="col-sm-4 control-label">团队组长默认管理提成</label>
						                                        <div class="col-sm-8">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="defaultDividend" class="form-control"  value='<fmt:formatNumber value="${product.defaultDividend}" pattern="0.00%"/>'> 
						                                        </div>
									                        </div>
															</div>
														</div>
														<!-- <div class="hr-line-dashed"></div> -->
														<div class="row">
															<div class="col-sm-6">
			                                                     <div class="form-group">
										                            <label class="col-sm-4 control-label">理财师默认佣金</label>
							                                        <div class="col-sm-8">
							                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" name="defaultCommission" class="form-control"  value='<fmt:formatNumber value="${product.defaultCommission}" pattern="0.00%"/>'> 
							                                        </div>
									                        	</div>
															</div>
														</div>
													</div>
						                             <!-- <div class="hr-line-dashed"></div> -->
						                              <div class="row" id="customSet">
										                <div class="col-sm-6">
			                                                     <div class="form-group">
										                            <label class="col-sm-4 control-label">&nbsp;</label>
							                                        <div class="col-sm-8">
										                            <table id="modelEditable_comm" class="table table-striped table-bordered table-hover">
										                                <thead>
											                               	 <tr>
											                                    <th>团队名称</th>
											                                    <th>团队组长</th>
											                                    <th>团队成员</th>
											                                    <!-- <th>佣金</th> -->
											                                </tr>
										                              	  </thead>
											                              <tbody>
											                              </tbody>
											                        </table>
										                     	</div>
										                     </div>
										                </div>
										            </div>
										            <!-- <div class="hr-line-dashed"></div> -->
						                              <div class="row" >
										                <div class="col-sm-6">
			                                                     <div class="form-group">
										                            <label class="col-sm-4 control-label">同类产品</label>
							                                        <div class="col-sm-8">
										                            <table id="" class="table table-striped table-bordered table-hover" style="font-size: 14px;">
										                                <thead>
											                               	 <tr>
											                                    <th>同类产品代码</th>
											                                    <th>同类产品名称</th>
											                                    <th>同类产品简称</th>
											                                </tr>
										                              	  </thead>
											                              <tbody>
											                              	<c:forEach items="${relatedProductList}" var="rp" varStatus="st">
											                              		<tr><td>${rp.productCode}</td><td>${rp.productName}</td><td>${rp.briefName}</td></tr>
												  							</c:forEach>
											                              </tbody>
											                        </table>
										                     	</div>
										                     </div>
										                </div>
										            </div>
						                             <!-- <div class="hr-line-dashed"></div> -->
						                             <div class="row">
									                    <div class="col-sm-6">
									                        <div class="form-group">
									                            <label class="col-sm-4 control-label">产品附件</label>
						                                        <div class="col-sm-8" id="relatedFileId">
						                                    	   <input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" class="form-control">  
						                                           <%-- <a  href="product/downloadFile?filePath=${product.contactFile}" title="Image from Unsplash" data-gallery="">${product.contactFile}</a>  --%> 
						                                        </div>
									                        </div>
									                    </div>
									                 </div>
						                             <!-- <div class="hr-line-dashed"></div> -->
						                                <div class="form-group">
						                                    <div class="col-sm-4 col-sm-offset-5">
						                                        <%-- <button class="btn btn-primary" type="button" onclick='javascript:window.location.href = "product/edit/${product.id}"'>编辑</button> --%>
						                                        <!-- <button class="btn btn-white" type="reset">取 消</button> -->
						                                    </div>
						                                </div>
						                           </form>
						                        </div>
						                    </div>
                                		</div>
                            		</div>
                        		</div>
                    		</div>
                		</div>
					</div>
		
        <!-- 底部版权 -->
        <jsp:include page="/WEB-INF/jsp/common/main-footer.jsp"></jsp:include>

        </div>
        </div>

    <!-- Mainly scripts -->
    <script src="js/jquery-2.1.1.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
	<script src="js/jquery.serialize-object.min.js" type="text/javascript"></script>
	<script src="js/plugins/validate/jquery.validate.min.js" type="text/javascript"></script>
    <!-- Custom and plugin javascript -->
    <script src="js/inspinia.js"></script>
    <script src="js/plugins/pace/pace.min.js"></script>
	<script src="js/plugins/bootbox/bootbox.min.js" type="text/javascript"></script>
    <!-- Data picker -->
    <script src="js/plugins/datapicker/bootstrap-datepicker.js"></script>

    <!-- Data Tables -->
    <script src="js/plugins/dataTables/jquery.dataTables.min.js"></script>
    <script src="js/plugins/dataTables/dataTables.bootstrap.js"></script>
    <script src="js/plugins/dataTables/dataTables.responsive.js"></script>
    <script src="js/plugins/dataTables/dataTables.tableTools.min.js"></script>
    
    <!-- 业务 -->
    <script src="js/ajaxfileupload.js"></script>
    <script src="js/product/product-grade-module.js"></script>
    <script src="js/product/product-commission.js"></script> 
    <script src="js/product/FormatUtils.js"></script>

    <!-- Page-Level Scripts -->
    <script>
        $(document).ready(function() {
        	ProductGradeModule.init();
			
			initSpecifiedContent();
			
			CommissionSetModule.init();
			initCommissionContent();
			getRelatedFile();
			
			
        });
        
        
        function initSpecifiedContent(){
        	var incomeType="";
			if("${product.incomeType}"==0){
				incomeType="固定";
			}else if("${product.incomeType}"==1){
				incomeType="浮动";
			}else if("${product.incomeType}"==2){
				incomeType="固定+浮动";
			}
			
			var operationMode="";
			if("${product.operationMode}"==0){
				operationMode="开放式";
			}else if("${product.operationMode}"==1){
				operationMode="封闭式";
			}
			
			var state="";
			if("${product.state}"==0){
				state="即将上线";
			}else if("${product.state}"==1){
				state="正在募集中";
			}else if("${product.state}"==2){
				state="募集完成";
			}
			$("#incomeType").val(incomeType);
			$("#operationMode").val(operationMode);
			$("#state").val(state);
		   /*  $("#riskControl").text("${product.riskControl}");
			$("#remark").text("${product.remark}");
			$("#investScope").text("${product.investScope}");  */
			$("#contactFile").val($("#contactFile").val().match(/[^\\/]*$/)[0]);
			
			if("${product.redeemFee}"==""){
				$("#redeemFee").val("--");
			}
			
			if("${product.manageFee}"==""){
				$("#manageFee").val("--");
			}
			
			if("${product.trusteeFee}"==""){
				$("#trusteeFee").val("--");
			}
			
			if("${product.setupTime}"==""){
				$("#setupTime").val("--");
			}
			
			if("${product.interestDate}"==""){
				$("#interestDate").val("--");
			}
			
			if("${product.showApp}"=="true"){
				 $("#showApp").val("是");  
				 $("#pushGroup").show();
			}
        }
        
        function getRelatedFile(){
        	$.ajax({
            	type:"get",
                url: ctx + "/productAttachment/query/${product.id}",
                dataType:"json",
                success: function(data){
                	if (data.code == 1) {
                		var objs = data.data.relatedFile;
                    	var html = '';
                    	
                    	for(var i=0;i<objs.length;i++){
                    		var fileName = objs[i].fileName;
                    		html+='<input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" class="form-control" value="'+fileName+'"/>';
                    	}
                    	
                    	if(html==''){
                    		$("#relatedFileId").html('<input readonly style="border:0px;background:#0f0;background-color:transparent;" type="text" class="form-control" value="--"/>');
                    	}else{
                    		$("#relatedFileId").html(html);
                    	}
                    	
                	}
                },
                error: function (msg) {
                	bootbox.alert(msg.message);
                }
            });
        }
    </script>
    
    <!-- 佣金设置 -->
    <script>
       
    function initCommissionContent(){
    	if("${product.defaultCommissionSet}"=="true"){
    		$("input[type='radio'][value='option1']").attr("checked","checked" );
    		$("#customSet").hide();
    		$("#default_comm_div").show();
    	}else{
    		$("input[type='radio'][value='option2']").attr("checked","checked" );
    		$("#customSet").show();
    		$("#default_comm_div").hide();
    	}
    }
    </script>

</body>
</html>